package com.dongliu.service;

import com.dongliu.domain.Admin;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
public interface AdminService {
    /**
     * 保存
     * @param admin
     * @return
     */
    public boolean save(Admin admin);

    /**
     * 修改
     * @param admin
     * @return
     */
    public boolean update(Admin admin);

    /**
     * 按id删除
     * @param id
     * @return
     */
    public boolean delete(Integer id);
    /**
     * 按id查询
     * @param id
     * @return
     */
    public Admin getById(Integer id);
    public Admin login(String username, String password);


    /**
     * 查询所有
     * @return
     */
    public List<Admin> getAll();

}
